import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import { IonicVue } from '@ionic/vue'

/* Core CSS required for Ionic components to work properly */
import '@ionic/vue/css/core.css'

/* Basic CSS for apps built with Ionic */
import '@ionic/vue/css/normalize.css'
import '@ionic/vue/css/structure.css'
import '@ionic/vue/css/typography.css'

/* Optional CSS utils that can be commented out */
import '@ionic/vue/css/padding.css'
import '@ionic/vue/css/float-elements.css'
import '@ionic/vue/css/text-alignment.css'
import '@ionic/vue/css/text-transformation.css'
import '@ionic/vue/css/flex-utils.css'
import '@ionic/vue/css/display.css'
import '@ionic/vue/css/palettes/dark.system.css'

//初始化esri的apikey
import esriConfig from '@arcgis/core/config.js'
esriConfig.apiKey =
  'AAPTxy8BH1VEsoebNVZXo8HurEpY-F4S0rTzprZc9F3sxlVOvgLl9zAKS9ZtDkUQK-o-5kVeic2HAgNSzfLX_KdnzgGuxXXBCJ9L89q9bFU--Y53ac3mZvz53YtaFTUc6-WW11HM064mLAIV8qs5wKjgK1UYPoKZNYFkSRLSNILytZ86rWf3sfO0d3f5lglwtpjy85ssNdel7NZVP5brsWtFNG0f--af1bpK5lkR3sReZtNglmgJ4MLpDLtAUPx7K52FAT1_lvtuNBbr'

//初始化esri语言
import * as intl from '@arcgis/core/intl.js'
intl.setLocale('zh-CN')

import pinia from './stores'

/* Theme variables */
import './theme/variables.css'

const app = createApp(App).use(IonicVue).use(router).use(pinia)

router.isReady().then(() => {
  app.mount('#app')
})
